package com.llws.petgoodsshop.mapper;


import com.llws.petgoodsshop.bean.Goods;
import com.llws.petgoodsshop.bean.GoodsVo;
import org.springframework.stereotype.Repository;

import java.awt.print.Book;
import java.util.List;

/**
* @Entity com.llws.petgoodsshop.bean.Goods
*/
@Repository
public interface GoodsMapper {

    /**
     * 添加商品
     * @param goodsVo
     * @return
     */
    public int addGoods(GoodsVo goodsVo);

    /**
     * 查询商品（支持模糊查询）
     * @param keywords
     * @return
     */
    public List<Goods> findGoodsAll(String keywords);

    /**
     * 修改商品
     * @param goodsVo
     * @return
     */
    public int updateGoods(GoodsVo goodsVo);

    /**
     * 删除商品
     * @param goodsId
     * @return
     */
    public int deleteGoods(int goodsId);
    /**
     * 上架或下架
     */
    public int updateStatus(Goods goods);
    /**
     * 上架
     */
    public List<Goods> findUpAll(String keywords);
    /**
     * 下架
     */
    public List<Goods> findDownAll(String keywords);
}
